package com.javaee.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.javaee.dao.TestDao;
import com.javaee.entity.Test;
import com.javaee.service.TestService;

@Service("testService")
public class TestServiceImpl implements TestService{

	@Resource
	private TestDao testDao;

	public List<Test> list(Map<String, Object> map) {
		return testDao.list(map);
	}

	public Long getTotal(Map<String, Object> map) {
		System.out.println(testDao.getTotal(map));
		return testDao.getTotal(map);
	}

	public Test findById(String id) {
		return testDao.findById(id);
	}

	public Integer update(Test test) {
		return testDao.update(test);
	}

	public Integer add(Test test) {
		return testDao.add(test);
	}

	public Integer delete(String id) {
		return testDao.delete(id);
	}

	/**
	 * 测试调用存储过程
	 * @param id
	 * @return
	 */
	public Test proCall(String id){
		return testDao.proCall(id);
	}

	/**
	 * 查询全部
	 */
	public List<Test> getList() {
		return testDao.getList();
	}

	/**
	 * 根据名字查询
	 */
	public List<Test> getByName(String name) {
		return testDao.getByName(name);
	}
}
